(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

is_empty(nil) → true
is_empty(cons(x, l)) → false
hd(cons(x, l)) → x
tl(cons(x, l)) → l
append(l1, l2) → ifappend(l1, l2, is_empty(l1))
ifappend(l1, l2, true) → l2
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), l2))

Rewrite Strategy: INNERMOST

(1) TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1).


The TRS R consists of the following rules:

is_empty(nil) → true [1]
is_empty(cons(x, l)) → false [1]
hd(cons(x, l)) → x [1]
tl(cons(x, l)) → l [1]
append(l1, l2) → ifappend(l1, l2, is_empty(l1)) [1]
ifappend(l1, l2, true) → l2 [1]
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), l2)) [1]

Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

is_empty(nil) → true [1]
is_empty(cons(x, l)) → false [1]
hd(cons(x, l)) → x [1]
tl(cons(x, l)) → l [1]
append(l1, l2) → ifappend(l1, l2, is_empty(l1)) [1]
ifappend(l1, l2, true) → l2 [1]
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), l2)) [1]

The TRS has the following type information:
is_empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: hd → nil:cons → nil:cons
false :: true:false
hd :: nil:cons → hd
tl :: nil:cons → nil:cons
append :: nil:cons → nil:cons → nil:cons
ifappend :: nil:cons → nil:cons → true:false → nil:cons

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


hd
append
ifappend

(c) The following functions are completely defined:

is_empty
tl

Due to the following rules being added:

tl(v0) → nil [0]

And the following fresh constants:

const

(6) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

is_empty(nil) → true [1]
is_empty(cons(x, l)) → false [1]
hd(cons(x, l)) → x [1]
tl(cons(x, l)) → l [1]
append(l1, l2) → ifappend(l1, l2, is_empty(l1)) [1]
ifappend(l1, l2, true) → l2 [1]
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), l2)) [1]
tl(v0) → nil [0]

The TRS has the following type information:
is_empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: hd → nil:cons → nil:cons
false :: true:false
hd :: nil:cons → hd
tl :: nil:cons → nil:cons
append :: nil:cons → nil:cons → nil:cons
ifappend :: nil:cons → nil:cons → true:false → nil:cons
const :: hd

Rewrite Strategy: INNERMOST

(7) NarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

is_empty(nil) → true [1]
is_empty(cons(x, l)) → false [1]
hd(cons(x, l)) → x [1]
tl(cons(x, l)) → l [1]
append(nil, l2) → ifappend(nil, l2, true) [2]
append(cons(x', l'), l2) → ifappend(cons(x', l'), l2, false) [2]
ifappend(l1, l2, true) → l2 [1]
ifappend(cons(x'', l''), l2, false) → cons(hd(cons(x'', l'')), append(l'', l2)) [2]
ifappend(l1, l2, false) → cons(hd(l1), append(nil, l2)) [1]
tl(v0) → nil [0]

The TRS has the following type information:
is_empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: hd → nil:cons → nil:cons
false :: true:false
hd :: nil:cons → hd
tl :: nil:cons → nil:cons
append :: nil:cons → nil:cons → nil:cons
ifappend :: nil:cons → nil:cons → true:false → nil:cons
const :: hd

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

nil => 0
true => 1
false => 0
const => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 2 }→ ifappend(0, l2, 1) :|: z' = l2, z = 0, l2 >= 0
append(z, z') -{ 2 }→ ifappend(1 + x' + l', l2, 0) :|: x' >= 0, l' >= 0, z' = l2, l2 >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ l2 :|: z = l1, z' = l2, l1 >= 0, l2 >= 0, z'' = 1
ifappend(z, z', z'') -{ 1 }→ 1 + hd(l1) + append(0, l2) :|: z'' = 0, z = l1, z' = l2, l1 >= 0, l2 >= 0
ifappend(z, z', z'') -{ 2 }→ 1 + hd(1 + x'' + l'') + append(l'', l2) :|: z'' = 0, l'' >= 0, z' = l2, x'' >= 0, l2 >= 0, z = 1 + x'' + l''
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0

(11) InliningProof (UPPER BOUND(ID) transformation)

Inlined the following terminating rules on right-hand sides where appropriate:

hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l

(12) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 2 }→ ifappend(0, l2, 1) :|: z' = l2, z = 0, l2 >= 0
append(z, z') -{ 2 }→ ifappend(1 + x' + l', l2, 0) :|: x' >= 0, l' >= 0, z' = l2, l2 >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ l2 :|: z = l1, z' = l2, l1 >= 0, l2 >= 0, z'' = 1
ifappend(z, z', z'') -{ 3 }→ 1 + x + append(l'', l2) :|: z'' = 0, l'' >= 0, z' = l2, x'' >= 0, l2 >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 2 }→ 1 + x + append(0, l2) :|: z'' = 0, z = l1, z' = l2, l1 >= 0, l2 >= 0, x >= 0, l >= 0, l1 = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0

(13) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(14) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 2 }→ ifappend(0, z', 1) :|: z = 0, z' >= 0
append(z, z') -{ 2 }→ ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 3 }→ 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 2 }→ 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

(15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ is_empty }
{ ifappend, append }
{ tl }
{ hd }

(16) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 2 }→ ifappend(0, z', 1) :|: z = 0, z' >= 0
append(z, z') -{ 2 }→ ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 3 }→ 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 2 }→ 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {is_empty}, {ifappend,append}, {tl}, {hd}

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: is_empty
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(18) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 2 }→ ifappend(0, z', 1) :|: z = 0, z' >= 0
append(z, z') -{ 2 }→ ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 3 }→ 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 2 }→ 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {is_empty}, {ifappend,append}, {tl}, {hd}
Previous analysis results are:
is_empty: runtime: ?, size: O(1) [1]

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: is_empty
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(20) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 2 }→ ifappend(0, z', 1) :|: z = 0, z' >= 0
append(z, z') -{ 2 }→ ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 3 }→ 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 2 }→ 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {ifappend,append}, {tl}, {hd}
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]

(21) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(22) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 2 }→ ifappend(0, z', 1) :|: z = 0, z' >= 0
append(z, z') -{ 2 }→ ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 3 }→ 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 2 }→ 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {ifappend,append}, {tl}, {hd}
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: ifappend
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: z + z2 + z'

Computed SIZE bound using PUBS for: append
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 12 + 14·z + 4·z2 + z'

(24) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 2 }→ ifappend(0, z', 1) :|: z = 0, z' >= 0
append(z, z') -{ 2 }→ ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 3 }→ 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 2 }→ 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {ifappend,append}, {tl}, {hd}
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]
ifappend: runtime: ?, size: O(n2) [z + z2 + z']
append: runtime: ?, size: O(n2) [12 + 14·z + 4·z2 + z']

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: ifappend
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 5·z

Computed RUNTIME bound using CoFloCo for: append
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 3 + 5·z

(26) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 2 }→ ifappend(0, z', 1) :|: z = 0, z' >= 0
append(z, z') -{ 2 }→ ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 3 }→ 1 + x + append(l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 2 }→ 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {tl}, {hd}
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]
ifappend: runtime: O(n1) [1 + 5·z], size: O(n2) [z + z2 + z']
append: runtime: O(n1) [3 + 5·z], size: O(n2) [12 + 14·z + 4·z2 + z']

(27) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(28) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (0 * 0) + 1 * z', z = 0, z' >= 0
append(z, z') -{ 8 + 5·l' + 5·x' }→ s' :|: s' >= 0, s' <= 1 * (1 + x' + l') + 1 * ((1 + x' + l') * (1 + x' + l')) + 1 * z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 6 + 5·l'' }→ 1 + x + s'' :|: s'' >= 0, s'' <= 12 + 14 * l'' + 4 * (l'' * l'') + 1 * z', z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 5 }→ 1 + x + s1 :|: s1 >= 0, s1 <= 12 + 14 * 0 + 4 * (0 * 0) + 1 * z', z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {tl}, {hd}
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]
ifappend: runtime: O(n1) [1 + 5·z], size: O(n2) [z + z2 + z']
append: runtime: O(n1) [3 + 5·z], size: O(n2) [12 + 14·z + 4·z2 + z']

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: tl
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(30) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (0 * 0) + 1 * z', z = 0, z' >= 0
append(z, z') -{ 8 + 5·l' + 5·x' }→ s' :|: s' >= 0, s' <= 1 * (1 + x' + l') + 1 * ((1 + x' + l') * (1 + x' + l')) + 1 * z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 6 + 5·l'' }→ 1 + x + s'' :|: s'' >= 0, s'' <= 12 + 14 * l'' + 4 * (l'' * l'') + 1 * z', z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 5 }→ 1 + x + s1 :|: s1 >= 0, s1 <= 12 + 14 * 0 + 4 * (0 * 0) + 1 * z', z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {tl}, {hd}
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]
ifappend: runtime: O(n1) [1 + 5·z], size: O(n2) [z + z2 + z']
append: runtime: O(n1) [3 + 5·z], size: O(n2) [12 + 14·z + 4·z2 + z']
tl: runtime: ?, size: O(n1) [z]

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: tl
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(32) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (0 * 0) + 1 * z', z = 0, z' >= 0
append(z, z') -{ 8 + 5·l' + 5·x' }→ s' :|: s' >= 0, s' <= 1 * (1 + x' + l') + 1 * ((1 + x' + l') * (1 + x' + l')) + 1 * z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 6 + 5·l'' }→ 1 + x + s'' :|: s'' >= 0, s'' <= 12 + 14 * l'' + 4 * (l'' * l'') + 1 * z', z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 5 }→ 1 + x + s1 :|: s1 >= 0, s1 <= 12 + 14 * 0 + 4 * (0 * 0) + 1 * z', z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {hd}
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]
ifappend: runtime: O(n1) [1 + 5·z], size: O(n2) [z + z2 + z']
append: runtime: O(n1) [3 + 5·z], size: O(n2) [12 + 14·z + 4·z2 + z']
tl: runtime: O(1) [1], size: O(n1) [z]

(33) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(34) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (0 * 0) + 1 * z', z = 0, z' >= 0
append(z, z') -{ 8 + 5·l' + 5·x' }→ s' :|: s' >= 0, s' <= 1 * (1 + x' + l') + 1 * ((1 + x' + l') * (1 + x' + l')) + 1 * z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 6 + 5·l'' }→ 1 + x + s'' :|: s'' >= 0, s'' <= 12 + 14 * l'' + 4 * (l'' * l'') + 1 * z', z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 5 }→ 1 + x + s1 :|: s1 >= 0, s1 <= 12 + 14 * 0 + 4 * (0 * 0) + 1 * z', z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {hd}
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]
ifappend: runtime: O(n1) [1 + 5·z], size: O(n2) [z + z2 + z']
append: runtime: O(n1) [3 + 5·z], size: O(n2) [12 + 14·z + 4·z2 + z']
tl: runtime: O(1) [1], size: O(n1) [z]

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: hd
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z

(36) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (0 * 0) + 1 * z', z = 0, z' >= 0
append(z, z') -{ 8 + 5·l' + 5·x' }→ s' :|: s' >= 0, s' <= 1 * (1 + x' + l') + 1 * ((1 + x' + l') * (1 + x' + l')) + 1 * z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 6 + 5·l'' }→ 1 + x + s'' :|: s'' >= 0, s'' <= 12 + 14 * l'' + 4 * (l'' * l'') + 1 * z', z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 5 }→ 1 + x + s1 :|: s1 >= 0, s1 <= 12 + 14 * 0 + 4 * (0 * 0) + 1 * z', z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed: {hd}
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]
ifappend: runtime: O(n1) [1 + 5·z], size: O(n2) [z + z2 + z']
append: runtime: O(n1) [3 + 5·z], size: O(n2) [12 + 14·z + 4·z2 + z']
tl: runtime: O(1) [1], size: O(n1) [z]
hd: runtime: ?, size: O(n1) [z]

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: hd
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(38) Obligation:

Complexity RNTS consisting of the following rules:

append(z, z') -{ 3 }→ s :|: s >= 0, s <= 1 * 0 + 1 * (0 * 0) + 1 * z', z = 0, z' >= 0
append(z, z') -{ 8 + 5·l' + 5·x' }→ s' :|: s' >= 0, s' <= 1 * (1 + x' + l') + 1 * ((1 + x' + l') * (1 + x' + l')) + 1 * z', x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l'
hd(z) -{ 1 }→ x :|: x >= 0, l >= 0, z = 1 + x + l
ifappend(z, z', z'') -{ 1 }→ z' :|: z >= 0, z' >= 0, z'' = 1
ifappend(z, z', z'') -{ 6 + 5·l'' }→ 1 + x + s'' :|: s'' >= 0, s'' <= 12 + 14 * l'' + 4 * (l'' * l'') + 1 * z', z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l
ifappend(z, z', z'') -{ 5 }→ 1 + x + s1 :|: s1 >= 0, s1 <= 12 + 14 * 0 + 4 * (0 * 0) + 1 * z', z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l
is_empty(z) -{ 1 }→ 1 :|: z = 0
is_empty(z) -{ 1 }→ 0 :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 1 }→ l :|: x >= 0, l >= 0, z = 1 + x + l
tl(z) -{ 0 }→ 0 :|: z >= 0

Function symbols to be analyzed:
Previous analysis results are:
is_empty: runtime: O(1) [1], size: O(1) [1]
ifappend: runtime: O(n1) [1 + 5·z], size: O(n2) [z + z2 + z']
append: runtime: O(n1) [3 + 5·z], size: O(n2) [12 + 14·z + 4·z2 + z']
tl: runtime: O(1) [1], size: O(n1) [z]
hd: runtime: O(1) [1], size: O(n1) [z]

(39) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(40) BOUNDS(1, n^1)